scalar Date
scalar Time
scalar DateTime
scalar Object
scalar JSON
scalar Upload
scalar UUID
scalar Email

enum DeletingStrategy {
    "Do not touch related items"
    NO_ACTION,

    "Set null for corresponding attributes in related items"
    SET_NULL,

    "Cascade delete related items"
    CASCADE
}

input IDFilterInput {
    contains: ID
    containsi: ID
    notContains: ID
    notContainsi: ID
    startsWith: ID
    endsWith: ID
    eq: ID
    ne: ID
    gt: ID
    gte: ID
    lt: ID
    lte: ID
    between: [ID]
    in: [ID]
    notIn: [ID]
    null: Boolean
    notNull: Boolean
    and: [IDFilterInput]
    or: [IDFilterInput]
    not: IDFilterInput
}

input UUIDFilterInput {
    contains: String
    containsi: String
    notContains: String
    notContainsi: String
    startsWith: String
    endsWith: String
    eq: UUID
    ne: UUID
    gt: String
    gte: String
    lt: String
    lte: String
    between: [String]
    in: [UUID]
    notIn: [UUID]
    null: Boolean
    notNull: Boolean
    and: [UUIDFilterInput]
    or: [UUIDFilterInput]
    not: UUIDFilterInput
}

input IntFilterInput {
    eq: Int
    ne: Int
    gt: Int
    gte: Int
    lt: Int
    lte: Int
    in: [Int]
    between: [Int]
    notIn: [Int]
    null: Boolean
    notNull: Boolean
    and: [IntFilterInput]
    or: [IntFilterInput]
    not: IntFilterInput
}

input FloatFilterInput {
    eq: Float
    ne: Float
    gt: Float
    gte: Float
    lt: Float
    lte: Float
    between: [Float]
    in: [Float]
    notIn: [Float]
    null: Boolean
    notNull: Boolean
    and: [FloatFilterInput]
    or: [FloatFilterInput]
    not: FloatFilterInput
}

input StringFilterInput {
    contains: String
    containsi: String
    notContains: String
    notContainsi: String
    startsWith: String
    endsWith: String
    eq: String
    ne: String
    gt: String
    gte: String
    lt: String
    lte: String
    between: [String]
    in: [String]
    notIn: [String]
    notNull: Boolean
    null: Boolean
    and: [StringFilterInput]
    or: [StringFilterInput]
    not: StringFilterInput
}

input BooleanFilterInput {
    eq: Boolean
    ne: Boolean
    in: [Boolean]
    notIn: [Boolean]
    null: Boolean
    notNull: Boolean
    and: [BooleanFilterInput]
    or: [BooleanFilterInput]
    not: BooleanFilterInput
}

input DateFilterInput {
    eq: Date
    ne: Date
    gt: Date
    gte: Date
    lt: Date
    lte: Date
    between: [Date]
    in: [Date]
    notIn: [Date]
    null: Boolean
    notNull: Boolean
    and: [DateFilterInput]
    or: [DateFilterInput]
    not: DateFilterInput
}

input TimeFilterInput {
    eq: Time
    ne: Time
    gt: Time
    gte: Time
    lt: Time
    lte: Time
    between: [Time]
    in: [Time]
    notIn: [Time]
    null: Boolean
    notNull: Boolean
    and: [TimeFilterInput]
    or: [TimeFilterInput]
    not: TimeFilterInput
}

input DateTimeFilterInput {
    eq: DateTime
    ne: DateTime
    gt: DateTime
    gte: DateTime
    lt: DateTime
    lte: DateTime
    between: [DateTime]
    in: [DateTime]
    notIn: [DateTime]
    null: Boolean
    notNull: Boolean
    and: [DateTimeFilterInput]
    or: [DateTimeFilterInput]
    not: DateTimeFilterInput
}

input JSONFilterInput {
    contains: JSON
    containsi: JSON
    notContains: JSON
    notContainsi: JSON
    startsWith: JSON
    endsWith: JSON
    eq: JSON
    ne: JSON
    gt: JSON
    gte: JSON
    lt: JSON
    lte: JSON
    between: [JSON]
    in: [JSON]
    notIn: [JSON]
    null: Boolean
    notNull: Boolean
    and: [JSONFilterInput]
    or: [JSONFilterInput]
    not: JSONFilterInput
}

input ObjectFilterInput {
    contains: Object
    containsi: Object
    notContains: Object
    notContainsi: Object
    startsWith: Object
    endsWith: Object
    eq: Object
    ne: Object
    gt: Object
    gte: Object
    lt: Object
    lte: Object
    between: [Object]
    in: [Object]
    notIn: [Object]
    null: Boolean
    notNull: Boolean
    and: [ObjectFilterInput]
    or: [ObjectFilterInput]
    not: ObjectFilterInput
}

input PaginationInput {
    page: Int
    pageSize: Int
    start: Int
    limit: Int
}

type Pagination {
    page: Int
    pageSize: Int
    start: Int
    limit: Int
    total: Int!
    pageCount: Int
}

type ResponseCollectionMeta {
    pagination: Pagination
}

type UserInfo {
    id: ID!
    username: String!
    roles: [String!]!
    sessionData: JSON
}

type Config {
    data: DataConfig!
    i18n: I18nConfig!
    security: SecurityConfig!
}

type DataConfig {
    dataSources: [String!]!
}

type I18nConfig {
    defaultLocale: String!
}

type SecurityConfig {
    oauth2Providers: [Oauth2ProviderConfig!]!
}

type Oauth2ProviderConfig {
    id: String!
    name: String!
    authUrl: String!
}

type MediaInfo {
    id: ID!
    filename: String!
    label: String,
    description: String
    fileSize: Int!
    mimetype: String!
    checksum: String!
    createdAt: DateTime!
}

type SessionDataResponse {
    data: JSON
}

type Query {
    me: UserInfo
    config: Config
}

type Mutation {
    updateSessionData(sessionData: JSON): SessionDataResponse
    upload(file: Upload!): MediaInfo
    uploadMultiple(files: [Upload!]!): [MediaInfo!]
}